<template>
	<div class="wrapper" v-if="show">
	  <span class="iconfont icon-shanchuguanbicha close" @click="close"></span>
	  <div class="cloum-line"></div>
	  <div class="block" :style="{backgroundImage:`url(${msgBgImg})`}">
	    <div class="expression"/>
	    <span class="a">{{prizeTitle}}</span>
	    <img class="" :src="prizeImg" style='width: 150rpx;height: 150rpx;'/>
      <div class="reg" @click="getItNow">
		  <span v-if="prizeType==5">感谢参与</span>
		  <span v-else>我的奖品</span></div>
	  </div>
	</div>
</template>
<script>

export default {
	name: "index",
  props:{
    show: false,
	prizeTitle: {
		type: String,
		default () {
			return {
				distance:''
			}
		}
	},
	prizeImg: {
		type: String,
		default () {
			return {
				distance:''
			}
		}
	},
	msgBgImg: {
		type: String,
		default () {
			return {
				distance:''
			}
		}
	},
	prizeType: {
		default () {
			return {
				distance:0
			}
		}
	},activityId: {
		default () {
			return {
				distance:0
			}
		}
	}
  },
	data() {
		return {
			myGiftList:'我的奖品'
		};
	},
	created() {
		
	},
	mounted() {
		
	},
	methods: {
    close(){
      this.$emit('update:show', false);
    },
    getItNow(){
		//类型(1.红包2.优惠卷3.积分4.实物.5.感谢参与)
		if(this.prizeType == 2 || this.prizeType == 4){
			//页面跳转
			var that = this;
			uni.navigateTo({
				url: '/pages/myPrize/myPrize?activityId='+that.activityId
			});
		}
      this.$emit('getItNow');
    }
	}
};
</script>
<style scoped>

.wrapper {
  z-index: 999;
  width: 100%;
  height: 900rpx;
  position:fixed;
  top: 200rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.close{
  font-size: 80rpx;
  color: #ffffff;
  margin-bottom: -5rpx;
}

.cloum-line{
  background-color: #ffffff;
  width: 4rpx;
  height: 120rpx;
  margin-bottom: -50rpx;
}

.block {
  width: 600rpx;
  height: 700rpx;
  background:  top center no-repeat;
  background-size: 650rpx 700rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.expression{
  width: 210rpx;
  height: 140rpx;
  margin-top: 50rpx;
}

.a{
  color:#ffffff;
  font-size: 40rpx;
  margin-bottom: 70rpx;
}

.b{
  color:#ffffff;
  font-size: 250rpx;
  line-height: 50rpx;
}

.reg{
  width: 350rpx;
  height: 80rpx;
  line-height: 80rpx;
  font-weight: 800;
  text-align: center;
  background-color: #FFFFFF;
  color: #ec611e;
  font-size: 40rpx;
  border-radius: 40rpx;
  margin-top: 60rpx;
}

</style>
